package com.hackintosh.flyweight.web;

/**
 * @description：
 * @author：twislyn
 * @date：Created in 2021/05/14
 * @modified By：
 * @version: 1.0
 */
public class ConcreteWebSite implements WebSite {
    private String key;

    ConcreteWebSite(String key) {
        this.key = key;
        System.out.println("具体享元" + key + "被创建！");
    }

    @Override
    public void use(User user) {
        System.out.print("具体享元" + key + "被调用，");
        System.out.println("非享元信息是:" + user.getName());
    }
}
